{# 继承父模板 #}
{% extends 'child1.html' %}

{# super #}
{% block head %}
  {# 没有写super() 会覆盖掉原来模板里的东西 #}
  {{ super() }}
  <p>Python</p>
{% endblock %}

{# include #}
{% block content %}
  {% include 'child2_include.html' %}
  <p>content</p>
{% endblock %}

{# 宏定义: Python 函数 #}
{% macro person(name,age) %}
  <b>姓名: {{name}}, age: {{ age }}</b>
{% endmacro %}

{% block foot %}
  {{ person("ikun", 25) }}
  {# 过滤器 #}
  <h1>{{ name | title }}</h1>
  {{ name | upper }}
{% endblock %}